From: Dan Carpenter Date: Wed, 10 Dec 2014 13:26:21 +0000 (+0300) Subject: ALSA: pcxhr: NULL dereference on probe failure X-Git-Tag: archive/raspbian/4.9.13-1+rpi1~10^2~5313^2~18 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=6e1d7a51392f06899bd7b693f28ac60fa1e00032;p=linux-4.9.git ALSA: pcxhr: NULL dereference on probe failure "card" is NULL if snd_card_new() fails. Signed-off-by: Dan Carpenter Signed-off-by: Takashi Iwai --- diff --git a/sound/pci/pcxhr/pcxhr.c b/sound/pci/pcxhr/pcxhr.c index a60293015267..c6092e48ceb6 100644 --- a/sound/pci/pcxhr/pcxhr.c +++ b/sound/pci/pcxhr/pcxhr.c @@ -1638,7 +1638,7 @@ static int pcxhr_probe(struct pci_dev *pci, 0, &card); if (err < 0) { - dev_err(card->dev, "cannot allocate the card %d\n", i); + dev_err(&pci->dev, "cannot allocate the card %d\n", i); pcxhr_free(mgr); return err; }